<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
    <!-- {{差值表达式}}  不能再标签属性中使用-->
       <p>{{nickname}}</p>
       <p>{{nickname.toUpperCase()}}</p>
       <p>{{nickname+"你好"}}</p>
       <p>{{age>=18?"成年":"未成年"}}</p>
       <p>{{friend.name}}</p>
       <p>{{friend.desc}}</p>

    </div>
    <!-- vue2 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
    <!-- vue3
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> -->
    <script>
        const app = new Vue({
            //通过el 配置选择器，指定Vue 管理那个div
            el: "#app",
            data:{//通过Data 提供数据
                nickname:"tom",
                age:18,
                friend:{
                    name:"jerry",
                    desc:"老鼠"
                }
            }
        });
    </script>
</body>
</html>